home *** CD-ROM | disk | FTP | other *** search
- Path: news.massey.ac.nz!sysadmin
- From: Nigel.Ramsay.1@massey.ac.nz
- Newsgroups: comp.lang.c++
- Subject: Problems calling library functions from C++ (c is OK)
- Date: Thu, 08 Feb 1996 10:25:56 +1200
- Organization: Massey University
- Message-ID: <311926F4.7EFB@uni.massey.ac.nz>
- NNTP-Posting-Host: pt-pc40.massey.ac.nz
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- Hi,
-
- I am having difficulty calling functions that are in an external
- library.
-
- When I stick to plain C code (using a .c extension), I can access the
- functions, but when I rename my files to extension .cpp, I get the
- following error:
-
- COMSTEST.OBJ(c:\dev\src\comstest.cpp) : error L2029: 'void __near
- __cdecl set_robot_on(int,int,int __near*)' : unresolved external
-
- I have tried adding...
-
- extern "C" {
- .
- .
- .
- }
-
- to the header file of the library, but still no luck.
-
- Can someone please suggest how I might solve this problem.
-
- Any help would be much appreciated.
-
- Thanks,
-
- Nigel Ramsay.
-